{% extends 'base.html'%}
{% block content %}
<p>This is news about {{stock.stock_name}}</p>

<p><a href="{{ newsdetail.link }}">{{ newsdetail.link }}</a></p>
	{% if user.is_authenticated %}
		 {% if has_rated %}
		 	<p>You already rated the news: {{ has_rated.rating }}</p>
		 {% else %}
			<form action="" method="POST">
				{{ form }}
				
				<input type="submit" name="submit" value="Rate" />
			</form>
			{% endif %}
	{%else%}
	you can login to rate news
	<a href="/users/login/"  class="current"><b onmouseout="this.style.color = 'black';" onmouseover="this.style.color = '#0BB359';" align="justify">Login</b></a>
	{% endif %}



<br>{{newsdetail.news_content}}</br>

<iframe src="{{ newsdetail.link }}" width="100%"  height="700px" />

<br/>

{%endblock%}